To add the sample data in a compressed form, you use a QuickTime DataCodec to perform the compression, as shown in Listing 3-10 . You replace the sample utility AddSpriteSampleToMedia call with a call to the sample utility AddCompressedSpriteSampleToMedia.
Listing 10 Adding the key frame sample in compressed form
/* AddSpriteSampleToMedia(myMedia, mySample, kSpriteMediaFrameDuration,
true, NULL); */
AddCompressedSpriteSampleToMedia(myMedia, mySample,
kSpriteMediaFrameDuration, true, zlibDataCompressorSubType,
NULL);
| Previous | Chapter Contents | Chapter Top | Next |